import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import {LoginComponent} from './login/login/login.component';
import {AppRoutingModule} from './app.routing.module';
import {PageNotFoundComponent} from './page-not-found/page-not-found.component';
import {FormsModule} from '@angular/forms';
import {MainModule} from './main/main.module';
import {ChooseShopComponent} from './login/choose-shop/choose-shop.component';
import {GetBackPwdComponent} from './login/get-back-pwd/get-back-pwd.component';
import {HashLocationStrategy, LocationStrategy} from '@angular/common';
import {PreloadAllModules, RouteReuseStrategy} from '@angular/router';
import { AppComponent } from './app.component';
import {ExtendHttpService} from "./common/extend-http.service";
import {ShareModule} from "./common/share.module";
import {HttpModule} from "@angular/http";
import {MainGuard} from "./main/grauds/main.guard";
import {SocketService} from "./main/services/socket.service";
import {HttpClientModule} from "@angular/common/http";
import {LoginGuard} from "./login/grauds/login.guard";
import {LoginService} from "./login/services/login.service";
import {GetBackPwd2Component} from "./login/get-back-pwd2/get-back-pwd2.component";

@NgModule({
  declarations: [
    AppComponent,
    LoginComponent,
    ChooseShopComponent,
    GetBackPwdComponent,
    GetBackPwd2Component,
    PageNotFoundComponent
  ],
  imports: [
    BrowserModule,
    FormsModule,
    HttpModule,
    HttpClientModule,
    AppRoutingModule,
    MainModule,
    ShareModule
  ],
  exports: [],
  providers: [
    // {
    //   provide: RouteReuseStrategy,
    //   useClass: CustomerReuseStrategy
    // },
    {
      provide: LocationStrategy,
      useClass: HashLocationStrategy
    },
    PreloadAllModules,
    ExtendHttpService,
    MainGuard,
    LoginGuard,
    LoginService,
    SocketService
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }
